package com.source.springmvc2x.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.ServletRequestUtils;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Created by tan on 2017/7/11.
 */
@Controller
public class AnnotationController {

	@RequestMapping(value = "/mytest")
	public ModelAndView test(HttpServletRequest request, HttpServletResponse response)
			throws Exception {
		System.out.println("AnnotationController Working.");

		ServletRequestUtils.getStringParameter(request, "ggg");
		return new ModelAndView("home");
	}
}
